#define _CRT_SECURE_NO_WARNINGS 1


void STLPopBack(SLTNode** phead)
{
	assert(*phead);

	SLTNode* tail = *phead;
	SLTNode* prev = NULL;
	while (tail->next != NULL)
	{
		prev = tail;
		tail = tail->next;
	}
	free(tail);
	prev->next = NULL;
}

void STLEraseFront(SLTNode** phead)
{
	assert(*phead);
	if ((*phead)->next == NULL) {
		free(*phead);
		*phead = NULL;
	}
	else {
    SLTNode* tail = *phead;
	tail = tail->next;
	free(*phead);
	*phead = tail;
	}
	
	
}